import request from '@/utils/request';
import { FindSchedule, FindScheduleItem, GetBookingSchedule, GetBookingScheduleRule } from '@/type/scheduleType';
import { Response } from '@/type/ResponseType';

enum Enum {
  getBookingScheduleRuleAPI = '/hosp/hospital/auth/getBookingScheduleRule',
  findScheduleListAPI = '/hosp/hospital/auth/findScheduleList'
}

/**
 * @description 获取可预约排班数据的接口
 * */
export const getBookingScheduleRuleAPI = (page: GetBookingSchedule) => request.get<GetBookingScheduleRule, Response<GetBookingScheduleRule>>(`${Enum.getBookingScheduleRuleAPI}/${page.page}/${page.limit}/${page.hoscode}/${page.depcode}`);


/**
 * @description 获取排班数据的接口
 * */
export const findScheduleListAPI = (params: FindSchedule) => request.get<FindScheduleItem, Response<FindScheduleItem[]>>(`${Enum.findScheduleListAPI}/${params.hoscode}/${params.depcode}/${params.workData}`);
